import request from '@/utils/request'

// 查询能源电力耗电统计列表
export function listPower(query) {
  return request({
    url: '/energy/power/list',
    method: 'get',
    params: query
  })
}

// 查询能源电力耗电统计列表(分页)
export function pagePower(query) {
  return request({
    url: '/energy/power/page',
    method: 'get',
    params: query
  })
}

// 查询能源电力耗电统计详细
export function getPower(id) {
  return request({
    url: '/energy/power/get/' + id,
    method: 'get'
  })
}

// 新增能源电力耗电统计
export function addPower(data) {
  return request({
    url: '/energy/power/add',
    method: 'post',
    data: data
  })
}

// 修改能源电力耗电统计
export function updatePower(data) {
  return request({
    url: '/energy/power/edit',
    method: 'post',
    data: data
  })
}

// 删除能源电力耗电统计
export function delPower(id) {
  return request({
    url: '/energy/power/remove/' + id,
    method: 'post'
  })
}

// 获取能源实时信息
export function getRealTimeInfo(query) {
  return request({
    url: '/energy/power/getRealTimeInfo',
    method: 'get',
    params: query
  })
}

// 查询电力配电区域日月年电力统计
export function getAreaPowerChart() {
  return request({
    url: '/energy/power/areaPowerChart',
    method: 'get'
  })
}
